package lab02.test15;

public class Graduate implements StudentInterface,TeacherInterface {
    //name（姓名），sex（性别），age（年龄），fee（每学期学费） pay（月工资）。

    String name;
    String sex;
    int age;
    int fee;
    int pay;

    public Graduate(String name, int fee, int pay) {

        this.name = name;
        this.fee = fee;
        this.pay = pay;
        if (this.pay - this.fee < 5000)
            System.out.println("You need a loan!");
        else
            System.out.println("You income is enough!");
    }


    @Override
    public double setPay() { return this.pay = pay;

    }

    @Override
    public double getPay() { return this.pay;

    }

    @Override
    public double setFee() { return this.fee = fee;

    }

    @Override
    public double getFee() { return this.fee;

    }
    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return name;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public int getAge() {
        return age;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getSex() {
        return sex;
    }

}
